package com.ciaojian.bytedance.vo.bytedance;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class ProductSavaOrUpdateVo implements Serializable {

    /**
     * product : {"category_full_name":"丽人·美发·美发","create_time":1637309716,"creator_account_id":7018761102112589863,"owner_account_id":7018761102112589863,"product_name":"【限时活动·新客专享·周六日通用】9.9新客首单优惠","attr_key_value_map":{"can_no_use_date":"{\"enable\":false}","use_time":"{\"use_time_type\":1}","real_name_info":"{\"enable\":false,\"scene\":0}","appointment":"{\"need_appointment\":false,\"ahead_time_type\":1}","superimposed_discounts":"false","auto_renew":"true","rec_person_num":"1","description_rich_text":"[{\"note_type\":1,\"content\":\"9.9限时活动，自购买日起，15天有效，过期自动退哦！\\n注：仅限潮剪新客户使用（未曾授权信息）\\n（新客指客户本人未曾在任何一家潮剪消费过）\\n新客团购券，小程序上每个手机号仅能使用一次\\n⚠️本店仅提供剪发、吹头、吸发服务！是吸剪吹，不是洗剪吹哦～\\n剪发服务流程：\\n1.打开【潮剪】小程序\\n2.选择你想去的门店→点击【去剪发】\\n3.选择你心仪的发型师→点击【取号】，进行排队等待服务。\\n4. 出示券码给发型师操作核销。\\n16家门店可用：\\n越秀区：\\n公园前地铁店\\n海珠区：\\n万宜华轩店；上渡路店；中大东门店；嘉轩街店；革新路店；\\n鹭江地铁站店；大塘地铁站店\\n天河区：\\n兴盛路店；黄埔大道西店；石牌西店；东方宝泰店；星座花园店\\n广州东站地铁店\\n荔湾区：\\n广钢新城店\\n坑口地铁站店\"}]","environment_image_list":"[{\"url\":\"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/a0cf55eb16949f82ac79119a82955f19?x-expires=1671181200\\u0026x-signature=KBcjp6pdf5haEMRV0C2y5mePKPw%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/4c041cb6e11cc1ede6d7ea91f3ead79e?x-expires=1671181200\\u0026x-signature=%2F0Ng%2Bz8nYel%2Feh2o2Wm%2BJBHu9Zg%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/eee207de656c7da82045775cda083c44?x-expires=1671181200\\u0026x-signature=t%2BDffiHrJ%2FhE%2Bl4oDubKf6Roi5w%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/78e7fa5cb311d27f3eea4675c66749b4?x-expires=1671181200\\u0026x-signature=JIgep1cN71Rjs%2FSCMuwDX0RaNq8%3D\\u0026from=709197913\"},{\"url\":\"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/d5c81e8fc4791a2ea73206c0b25ae87c?x-expires=1671181200\\u0026x-signature=W77Jcaj13pc8615DGcAet8zybj4%3D\\u0026from=709197913\"}]","show_channel":"1","customer_reserved_info":"{\"allow\":true,\"allow_tel\":true}","image_list":"[{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/2a63d205cf8522d5f0a6716e3903c4a9?x-expires=1671181200\\u0026x-signature=9gZWD%2FOWfUH3MIt7r7rpRvPEszo%3D\\u0026from=709197913\"},{\"url\":\"https://p6-sign.douyinpic.com/obj/douyin-user-image-file/b1d732398a295d98ac3921d31c3eca5e?x-expires=1671181200\\u0026x-signature=PbLBMtN%2Bm%2F6C3iJUr1S3cXGWP%2Bg%3D\\u0026from=709197913\"}]","use_date":"{\"use_date_type\":2,\"day_duration\":15,\"use_start_date\":\"\",\"use_end_date\":\"\",\"days_of_week\":null}"},"sold_end_time":1673193600,"update_time":1670988818,"product_type":1,"category_id":17001001,"sold_start_time":1655092800,"account_name":"广州潮剪企业发展有限公司","product_id":"1716840727677966","biz_line":5,"poi_list":[{"supplier_ext_id":"6878279715904325632","poi_id":6878279715904325632},{"supplier_ext_id":"6754147427495708676","poi_id":6754147427495708676},{"supplier_ext_id":"6732996507236173838","poi_id":6732996507236173838},{"supplier_ext_id":"6721189668974512135","poi_id":6721189668974512135},{"supplier_ext_id":"6873435513848711175","poi_id":6873435513848711175},{"supplier_ext_id":"6729124296515487756","poi_id":6729124296515487756},{"supplier_ext_id":"7019126737283844108","poi_id":7019126737283844108},{"supplier_ext_id":"7070813042379851813","poi_id":7070813042379851813},{"supplier_ext_id":"7046611728687171625","poi_id":7046611728687171625},{"supplier_ext_id":"7115313819437500447","poi_id":7115313819437500447},{"supplier_ext_id":"7116830317544998924","poi_id":7116830317544998924},{"supplier_ext_id":"7122641249433028619","poi_id":7122641249433028619},{"supplier_ext_id":"7149022243962488862","poi_id":7149022243962488862},{"supplier_ext_id":"7122806993848535054","poi_id":7122806993848535054},{"supplier_ext_id":"7122639539574671398","poi_id":7122639539574671398},{"supplier_ext_id":"7151579854863861772","poi_id":7151579854863861772},{"supplier_ext_id":"7151579227395983392","poi_id":7151579227395983392},{"supplier_ext_id":"7151569880725063688","poi_id":7151569880725063688}]}
     * online_status : 1
     * commission_info : {"platform_take_rate":350}
     * sku : {"update_time":1670988818,"origin_amount":4800,"create_time":1637309716,"actual_amount":990,"sku_id":"1716840727677966","sku_name":"【限时活动·新客专享·周六日通用】9.9新客首单优惠","stock":{"limit_type":2,"stock_qty":10000000000},"attr_key_value_map":{"take_rate":"60","commodity":"[{\"group_name\":\"剪发券\",\"total_count\":1,\"option_count\":1,\"item_list\":[{\"name\":\"9.9新客单次剪发\",\"price\":4800,\"count\":1,\"unit\":\"份\"}]}]","settle_type":"1","use_type":"1","refund_need_merchant_confirm":"false","refund_type":"[\"过期退款\",\"随时退款\"]","limit_buy_rule":"{\"enable_limit\":true,\"rule_list\":[{\"subject_type\":1,\"range_type\":3,\"limit_num\":1,\"unit\":\"张\"}]}","code_source_type":"1","limit_rule":"{\"is_limit\":true,\"total_buy_num\":1}"},"status":1}
     */

    private ProductBean product;
    private int online_status;
    private CommissionInfoBean commission_info;
    private SkuBean sku;

    @Data
        public static class ProductBean implements Serializable {
        /**
         * category_full_name : 丽人·美发·美发
         * create_time : 1637309716
         * creator_account_id : 7018761102112589863
         * owner_account_id : 7018761102112589863
         * product_name : 【限时活动·新客专享·周六日通用】9.9新客首单优惠
         * attr_key_value_map : {"can_no_use_date":"{\"enable\":false}","use_time":"{\"use_time_type\":1}","real_name_info":"{\"enable\":false,\"scene\":0}","appointment":"{\"need_appointment\":false,\"ahead_time_type\":1}","superimposed_discounts":"false","auto_renew":"true","rec_person_num":"1","description_rich_text":"[{\"note_type\":1,\"content\":\"9.9限时活动，自购买日起，15天有效，过期自动退哦！\\n注：仅限潮剪新客户使用（未曾授权信息）\\n（新客指客户本人未曾在任何一家潮剪消费过）\\n新客团购券，小程序上每个手机号仅能使用一次\\n⚠️本店仅提供剪发、吹头、吸发服务！是吸剪吹，不是洗剪吹哦～\\n剪发服务流程：\\n1.打开【潮剪】小程序\\n2.选择你想去的门店→点击【去剪发】\\n3.选择你心仪的发型师→点击【取号】，进行排队等待服务。\\n4. 出示券码给发型师操作核销。\\n16家门店可用：\\n越秀区：\\n公园前地铁店\\n海珠区：\\n万宜华轩店；上渡路店；中大东门店；嘉轩街店；革新路店；\\n鹭江地铁站店；大塘地铁站店\\n天河区：\\n兴盛路店；黄埔大道西店；石牌西店；东方宝泰店；星座花园店\\n广州东站地铁店\\n荔湾区：\\n广钢新城店\\n坑口地铁站店\"}]","environment_image_list":"[{\"url\":\"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/a0cf55eb16949f82ac79119a82955f19?x-expires=1671181200\\u0026x-signature=KBcjp6pdf5haEMRV0C2y5mePKPw%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/4c041cb6e11cc1ede6d7ea91f3ead79e?x-expires=1671181200\\u0026x-signature=%2F0Ng%2Bz8nYel%2Feh2o2Wm%2BJBHu9Zg%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/eee207de656c7da82045775cda083c44?x-expires=1671181200\\u0026x-signature=t%2BDffiHrJ%2FhE%2Bl4oDubKf6Roi5w%3D\\u0026from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/78e7fa5cb311d27f3eea4675c66749b4?x-expires=1671181200\\u0026x-signature=JIgep1cN71Rjs%2FSCMuwDX0RaNq8%3D\\u0026from=709197913\"},{\"url\":\"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/d5c81e8fc4791a2ea73206c0b25ae87c?x-expires=1671181200\\u0026x-signature=W77Jcaj13pc8615DGcAet8zybj4%3D\\u0026from=709197913\"}]","show_channel":"1","customer_reserved_info":"{\"allow\":true,\"allow_tel\":true}","image_list":"[{\"url\":\"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/2a63d205cf8522d5f0a6716e3903c4a9?x-expires=1671181200\\u0026x-signature=9gZWD%2FOWfUH3MIt7r7rpRvPEszo%3D\\u0026from=709197913\"},{\"url\":\"https://p6-sign.douyinpic.com/obj/douyin-user-image-file/b1d732398a295d98ac3921d31c3eca5e?x-expires=1671181200\\u0026x-signature=PbLBMtN%2Bm%2F6C3iJUr1S3cXGWP%2Bg%3D\\u0026from=709197913\"}]","use_date":"{\"use_date_type\":2,\"day_duration\":15,\"use_start_date\":\"\",\"use_end_date\":\"\",\"days_of_week\":null}"}
         * sold_end_time : 1673193600
         * update_time : 1670988818
         * product_type : 1
         * category_id : 17001001
         * sold_start_time : 1655092800
         * account_name : 广州潮剪企业发展有限公司
         * product_id : 1716840727677966
         * biz_line : 5
         * poi_list : [{"supplier_ext_id":"6878279715904325632","poi_id":6878279715904325632},{"supplier_ext_id":"6754147427495708676","poi_id":6754147427495708676},{"supplier_ext_id":"6732996507236173838","poi_id":6732996507236173838},{"supplier_ext_id":"6721189668974512135","poi_id":6721189668974512135},{"supplier_ext_id":"6873435513848711175","poi_id":6873435513848711175},{"supplier_ext_id":"6729124296515487756","poi_id":6729124296515487756},{"supplier_ext_id":"7019126737283844108","poi_id":7019126737283844108},{"supplier_ext_id":"7070813042379851813","poi_id":7070813042379851813},{"supplier_ext_id":"7046611728687171625","poi_id":7046611728687171625},{"supplier_ext_id":"7115313819437500447","poi_id":7115313819437500447},{"supplier_ext_id":"7116830317544998924","poi_id":7116830317544998924},{"supplier_ext_id":"7122641249433028619","poi_id":7122641249433028619},{"supplier_ext_id":"7149022243962488862","poi_id":7149022243962488862},{"supplier_ext_id":"7122806993848535054","poi_id":7122806993848535054},{"supplier_ext_id":"7122639539574671398","poi_id":7122639539574671398},{"supplier_ext_id":"7151579854863861772","poi_id":7151579854863861772},{"supplier_ext_id":"7151579227395983392","poi_id":7151579227395983392},{"supplier_ext_id":"7151569880725063688","poi_id":7151569880725063688}]
         */

        //品类全名，保存时不必填写
        private String category_full_name;
        private int create_time;
//        private long creator_account_id;
        //商品名
        private String product_name;

        private int conponId;

        //商品属性KV，填写时参考下文「attr_key_value_map的格式」
        private AttrKeyValueMapBean attr_key_value_map;

        private int update_time;
        //商品类型：1 : 团购套餐 3 : 预售券 4 : 日历房 5 : 门票 7 : 旅行跟拍 8 : 一日游 11 : 代金券 14: x项目
        private int product_type;
        private int category_id;
        //售卖开始时间
        private int sold_start_time;
        //售卖结束时间
        private int sold_end_time;
        //商家名
        private String account_name;
        //第三方跳转链接，小程序商品必填
        private String out_url;
        //外部商品id
        private String out_id;
        //商品Id，创建时不必填写，更新时如有out_id可不填写
        private String product_id;
        //业务线 1-闭环自研开发者  5-小程序
        private int biz_line;
        //店铺列表
        private List<PoiListBean> poi_list;

        @Data
        public static class AttrKeyValueMapBean implements Serializable {
            /**
             * can_no_use_date : {"enable":false}
             * use_time : {"use_time_type":1}
             * real_name_info : {"enable":false,"scene":0}
             * appointment : {"need_appointment":false,"ahead_time_type":1}
             * superimposed_discounts : false
             * auto_renew : true
             * rec_person_num : 1
             * description_rich_text : [{"note_type":1,"content":"9.9限时活动，自购买日起，15天有效，过期自动退哦！\n注：仅限潮剪新客户使用（未曾授权信息）\n（新客指客户本人未曾在任何一家潮剪消费过）\n新客团购券，小程序上每个手机号仅能使用一次\n⚠️本店仅提供剪发、吹头、吸发服务！是吸剪吹，不是洗剪吹哦～\n剪发服务流程：\n1.打开【潮剪】小程序\n2.选择你想去的门店→点击【去剪发】\n3.选择你心仪的发型师→点击【取号】，进行排队等待服务。\n4. 出示券码给发型师操作核销。\n16家门店可用：\n越秀区：\n公园前地铁店\n海珠区：\n万宜华轩店；上渡路店；中大东门店；嘉轩街店；革新路店；\n鹭江地铁站店；大塘地铁站店\n天河区：\n兴盛路店；黄埔大道西店；石牌西店；东方宝泰店；星座花园店\n广州东站地铁店\n荔湾区：\n广钢新城店\n坑口地铁站店"}]
             * environment_image_list : [{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/a0cf55eb16949f82ac79119a82955f19?x-expires=1671181200\u0026x-signature=KBcjp6pdf5haEMRV0C2y5mePKPw%3D\u0026from=709197913"},{"url":"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/4c041cb6e11cc1ede6d7ea91f3ead79e?x-expires=1671181200\u0026x-signature=%2F0Ng%2Bz8nYel%2Feh2o2Wm%2BJBHu9Zg%3D\u0026from=709197913"},{"url":"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/eee207de656c7da82045775cda083c44?x-expires=1671181200\u0026x-signature=t%2BDffiHrJ%2FhE%2Bl4oDubKf6Roi5w%3D\u0026from=709197913"},{"url":"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/78e7fa5cb311d27f3eea4675c66749b4?x-expires=1671181200\u0026x-signature=JIgep1cN71Rjs%2FSCMuwDX0RaNq8%3D\u0026from=709197913"},{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/d5c81e8fc4791a2ea73206c0b25ae87c?x-expires=1671181200\u0026x-signature=W77Jcaj13pc8615DGcAet8zybj4%3D\u0026from=709197913"}]
             * show_channel : 1
             * customer_reserved_info : {"allow":true,"allow_tel":true}
             * image_list : [{"url":"https://p26-sign.douyinpic.com/obj/douyin-user-image-file/2a63d205cf8522d5f0a6716e3903c4a9?x-expires=1671181200\u0026x-signature=9gZWD%2FOWfUH3MIt7r7rpRvPEszo%3D\u0026from=709197913"},{"url":"https://p6-sign.douyinpic.com/obj/douyin-user-image-file/b1d732398a295d98ac3921d31c3eca5e?x-expires=1671181200\u0026x-signature=PbLBMtN%2Bm%2F6C3iJUr1S3cXGWP%2Bg%3D\u0026from=709197913"}]
             * use_date : {"use_date_type":2,"day_duration":15,"use_start_date":"","use_end_date":"","days_of_week":null}
             */

            private String can_no_use_date;
            private String use_time;
            private String real_name_info;
            private String appointment;
            private String superimposed_discounts;
            private String limit_gender; //性别 0全部 1男 2女

            @JsonProperty(value = "Description")
            @JSONField(name="Description")
            private String Description;
            private String limit_hair_length; //0-不限制 1-限制长发 2-限制短发
            private String auto_renew;
            private String rec_person_num;
            private String description_rich_text;
            private String environment_image_list;
            private String code_source_type;


            @JsonProperty(value = "Notification")
            @JSONField(name="Notification")
            private String Notification;
            private String show_channel;
            private String customer_reserved_info;
            private String image_list;
            private String detail_image_list;
            private String use_date;
            private String original_vip_can_experience;
            @JsonProperty(value = "EntryType")
            @JSONField(name="EntryType")
            private String EntryType;

            @JsonProperty(value = "SubTitle")
            @JSONField(name="SubTitle")
            private String SubTitle;

            @JsonProperty(value = "RefundPolicy")
            @JSONField(name="RefundPolicy")
            private String RefundPolicy; //1-允许退款 2-不可退款 3-有条件退
            private String refund_need_merchant_confirm; //是否要商家退款审核 布尔

            @JsonProperty(value = "Description")
            @JSONField(name="Description")
            public String getDescription() {
                return Description;
            }


            @JsonProperty(value = "Description")
            @JSONField(name="Description")
            public void setDescription(String Description) {
                this.Description = Description;
            }

            @JsonProperty(value = "SubTitle")
            @JSONField(name="SubTitle")
            public String getSubTitle() {
                return SubTitle;
            }


            @JsonProperty(value = "SubTitle")
            @JSONField(name="SubTitle")
            public void setSubTitle(String SubTitle) {
                this.SubTitle = SubTitle;
            }

            @JsonProperty(value = "EntryType")
            @JSONField(name="EntryType")
            public String getEntryType() {
                return EntryType;
            }

            @JsonProperty(value = "EntryType")
            @JSONField(name="EntryType")
            public void setEntryType(String EntryType) {
                this.EntryType = EntryType;
            }


            @JsonProperty(value = "Notification")
            @JSONField(name="Notification")
            public String getNotification() {
                return Notification;
            }

            @JsonProperty(value = "Notification")
            @JSONField(name="Notification")
            public void setNotification(String Notification) {
                this.Notification = Notification;
            }


            @JsonProperty(value = "RefundPolicy")
            @JSONField(name="RefundPolicy")
            public String getRefundPolicy() {
                return RefundPolicy;
            }


            @JsonProperty(value = "RefundPolicy")
            @JSONField(name="RefundPolicy")
            public void setRefundPolicy(String RefundPolicy) {
                this.RefundPolicy = RefundPolicy;
            }
        }

        @Data
        public static class PoiListBean implements Serializable {
            /**
             * supplier_ext_id : 6878279715904325632
             * poi_id : 6878279715904325632
             */

            //接入方店铺id，保存时必传
            private String supplier_ext_id;
            private String poi_id;
        }
    }

    @Data
    public static class CommissionInfoBean implements Serializable {
        /**
         * platform_take_rate : 350
         */

        private int platform_take_rate;
    }

    @Data
    public static class SkuBean implements Serializable {
        /**
         * update_time : 1670988818
         * origin_amount : 4800
         * create_time : 1637309716
         * actual_amount : 990
         * sku_id : 1716840727677966
         * sku_name : 【限时活动·新客专享·周六日通用】9.9新客首单优惠
         * stock : {"limit_type":2,"stock_qty":10000000000}
         * attr_key_value_map : {"take_rate":"60","commodity":"[{\"group_name\":\"剪发券\",\"total_count\":1,\"option_count\":1,\"item_list\":[{\"name\":\"9.9新客单次剪发\",\"price\":4800,\"count\":1,\"unit\":\"份\"}]}]","settle_type":"1","use_type":"1","refund_need_merchant_confirm":"false","refund_type":"[\"过期退款\",\"随时退款\"]","limit_buy_rule":"{\"enable_limit\":true,\"rule_list\":[{\"subject_type\":1,\"range_type\":3,\"limit_num\":1,\"unit\":\"张\"}]}","code_source_type":"1","limit_rule":"{\"is_limit\":true,\"total_buy_num\":1}"}
         * status : 1
         */

        private int update_time;
        //"原价，团购创建时如有commodity属性可不填，会根据菜品搭配计算原价，
        //计算方式： 菜品搭配x选n，菜品组价格从大到小排序，累加n个菜品组价格得出原价"
        private int origin_amount;
        //创建时间
        private int create_time;
        //实际支付价格
        private int actual_amount;
        // sku id，创建时不必填写
        private String sku_id;
        // sku名
        private String sku_name;
        //库存信息
        private StockBean stock;
        private AttrKeyValueMapBeanX attr_key_value_map;
        //状态 1-在线，2-待售 ； 默认传1
        private int status;


        @Data
        public static class StockBean implements Serializable {
            /**
             * limit_type : 2
             * stock_qty : 10000000000
             */
            //库存上限类型，为2时stock_qty和avail_qty字段无意义  1-有限库存 2-无限库存
            private int limit_type;
            //总库存，limit_type=2时无意义
            private long stock_qty;
        }

        @Data
        public static class AttrKeyValueMapBeanX implements Serializable {
            /**
             * take_rate : 60
             * commodity : [{"group_name":"剪发券","total_count":1,"option_count":1,"item_list":[{"name":"9.9新客单次剪发","price":4800,"count":1,"unit":"份"}]}]
             * settle_type : 1
             * use_type : 1
             * refund_need_merchant_confirm : false
             * refund_type : ["过期退款","随时退款"]
             * limit_buy_rule : {"enable_limit":true,"rule_list":[{"subject_type":1,"range_type":3,"limit_num":1,"unit":"张"}]}
             * code_source_type : 1
             * limit_rule : {"is_limit":true,"total_buy_num":1}
             */

            private String take_rate;
            private String commodity;
            private String settle_type;
            private String use_type;
            private String refund_need_merchant_confirm;
            private String refund_type;
            private String limit_buy_rule;
            private String code_source_type;
            private String limit_rule;
            private String RefundPolicy; //1-允许退款 2-不可退款 3-有条件退
            private String Notification;
        }
    }
}
